package com.hafu.swing;
import com.hafu.service.CourseService;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class EditCourseDialog extends JDialog {
    private JButton editButton;

    public EditCourseDialog(JFrame parent, CourseService courseService, String courseId) {
        super(parent, "编辑课程", true); // 初始化对话框
        setSize(400, 300);
        setLocationRelativeTo(parent);

        editButton = new JButton("编辑");
        editButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(EditCourseDialog.this, "课程编辑功能待实现", "提示", JOptionPane.INFORMATION_MESSAGE);
            }
        });

        JPanel panel = new JPanel();
        panel.add(editButton);
        add(panel);
    }
}